home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume22 / transfig / part01 next >
Encoding:
Internet Message Format  |  1990-10-09  |  60.5 KB

  1. Subject:  v23i014:  Tools for creating TeX documents with portable graphics, Part01/06
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 639ca2be 5786fa36 6e706f0c 04c648f2
  5.  
  6. Submitted-by: Micah Beck <beck@cs.cornell.edu>
  7. Posting-number: Volume 23, Issue 14
  8. Archive-name: transfig/part01
  9.  
  10. TransFig is a set of tools for creating TeX documents with graphics
  11. which are portable, in the sense that they can be printed in a wide
  12. variety of environments.
  13.  
  14. The transfig directory contains the source for the transfig command
  15. which generates a Makefile which translates Fig code to various graphics
  16. description languages using the fig2dev program.  In previous releases,
  17. this command was implemented as a shell script.
  18.  
  19. Drivers currently exist for the following graphics langauges:
  20. (E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, and PostScript.
  21. Fig2dev can be configured with a subset of these drivers
  22.  
  23. XMicah Beck                beck@cs.cornell.edu
  24. XDept of Computer Science
  25. XCornell University
  26.  
  27. #! /bin/sh
  28. # This is a shell archive.  Remove anything before this line, then unpack
  29. # it by saving it into a file and typing "sh file".  To overwrite existing
  30. # files, type "sh file -c".  You can also feed this as standard input via
  31. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  32. # will see the following message at the end:
  33. #        "End of archive 1 (of 6)."
  34. # Contents:  transfig transfig/Makefile transfig/README
  35. #   transfig/VERSION transfig/doc transfig/doc/manual
  36. #   transfig/doc/manual/Makefile transfig/doc/manual/README
  37. #   transfig/doc/manual/setup12.tex transfig/doc/manual/threepart.sty
  38. #   transfig/doc/manual/trans.fig.uu transfig/doc/manual/trans.tex
  39. #   transfig/doc/manual/transfig.tex transfig/doc/transfig.1
  40. #   transfig/fig2dev transfig/fig2dev/Makefile transfig/fig2dev/NOTES
  41. #   transfig/fig2dev/alloc.h transfig/fig2dev/arrow.c
  42. #   transfig/fig2dev/dev transfig/fig2dev/dev/Makefile
  43. #   transfig/fig2dev/dev/genbox.c transfig/fig2dev/dev/picfonts.h
  44. #   transfig/fig2dev/dev/texfonts.h transfig/fig2dev/drivers.h
  45. #   transfig/fig2dev/fig2dev.h transfig/fig2dev/fig2ps2tex
  46. #   transfig/fig2dev/free.c transfig/fig2dev/getopt.c
  47. #   transfig/fig2dev/newfont.h transfig/fig2dev/pi.h
  48. #   transfig/fig2dev/pic2tpic transfig/patchlevel.h transfig/transfig
  49. #   transfig/transfig/Makefile transfig/transfig/mkfile.c
  50. #   transfig/transfig/sys.c transfig/transfig/transfig.c
  51. #   transfig/transfig/transfig.h transfig/transfig/txfile.c
  52. # Wrapped by beck@rocky on Thu May 17 15:56:10 1990
  53. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  54. if test ! -d 'transfig' ; then
  55.     echo shar: Creating directory \"'transfig'\"
  56.     mkdir 'transfig'
  57. fi
  58. if test -f 'transfig/Makefile' -a "${1}" != "-c" ; then 
  59.   echo shar: Will not clobber existing file \"'transfig/Makefile'\"
  60. else
  61. echo shar: Extracting \"'transfig/Makefile'\" \(763 characters\)
  62. sed "s/^X//" >'transfig/Makefile' <<'END_OF_FILE'
  63. X#
  64. X# Top level Makefile for TransFig
  65. X#
  66. X# to make fig2dev:         type "make"
  67. X#
  68. X# to install:              set  BINDIR in Makefile
  69. X#               type "make install"
  70. X#
  71. X# to make manual:          type "make manual"
  72. X
  73. X# directory in which to install executables
  74. XBINDIR = /usr/local/bin
  75. XMANDIR = /usr/local/man/man1
  76. X
  77. Xall:
  78. X    cd transfig; make
  79. X    cd fig2dev; make
  80. X
  81. Xmanual: 
  82. X    cd doc/manual; make; latex manual; latex manual
  83. X
  84. Xinstall:    all
  85. X    install -c -s transfig/transfig$(TARGET_ARCH) $(BINDIR)/transfig
  86. X    install -c -s fig2dev/fig2dev$(TARGET_ARCH) $(BINDIR)/fig2dev
  87. X    install -c fig2dev/fig2ps2tex $(BINDIR)
  88. X    install -c fig2dev/pic2tpic $(BINDIR)
  89. X    install -c doc/transfig.1 doc/fig2dev.1 $(MANDIR)
  90. X
  91. Xclean:
  92. X    cd transfig; make clean
  93. X    cd fig2dev; make clean
  94. X    cd doc/manual; make clean
  95. END_OF_FILE
  96. if test 763 -ne `wc -c <'transfig/Makefile'`; then
  97.     echo shar: \"'transfig/Makefile'\" unpacked with wrong size!
  98. fi
  99. # end of 'transfig/Makefile'
  100. fi
  101. if test -f 'transfig/README' -a "${1}" != "-c" ; then 
  102.   echo shar: Will not clobber existing file \"'transfig/README'\"
  103. else
  104. echo shar: Extracting \"'transfig/README'\" \(1513 characters\)
  105. sed "s/^X//" >'transfig/README' <<'END_OF_FILE'
  106. XTransFig is a set of tools for creating TeX documents with graphics
  107. Xwhich are portable, in the sense that they can be printed in a wide
  108. Xvariety of environments.
  109. X
  110. XThe transfig directory contains the source for the transfig command
  111. Xwhich generates a Makefile which translates Fig code to various graphics
  112. Xdescription languages using the fig2dev program.  In previous releases,
  113. Xthis command was implemented as a shell script.
  114. X
  115. XThe fig2dev directory contains a general program for translating from
  116. XFig code to other graphics desciption languages.  The dev subdirectory
  117. Xcontains a library of output drivers used by fig2dev.
  118. X
  119. XDrivers currently exist for the following graphics langauges:
  120. X(E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, and PostScript.
  121. XFig2dev can be configured with a subset of these drivers
  122. X
  123. XThe doc directory contains man pages for fig2dev and for the transfig command.
  124. XThe subdirectory doc/manual contains a manual for using TransFig to create
  125. Xdocuments with portable graphics.  The manual also contains a reference
  126. Xguide describing Fig code in detail, and a description of TFX, an extension to
  127. XFig code which is supported by the translators in this package.
  128. X
  129. XMicah Beck                beck@cs.cornell.edu
  130. XDept of Computer Science
  131. XCornell University
  132. X
  133. X1 January 1990
  134. X--------------
  135. X
  136. XVersion 2.0 note: The PostScript translation implemented by fig2dev
  137. Xnow supports both the TFX version of Fig code and the V2.0, the dialect
  138. Xused by XFig Version 2.0.  The other translations support only TFX.
  139. X
  140. X1 May 1990
  141. X
  142. END_OF_FILE
  143. if test 1513 -ne `wc -c <'transfig/README'`; then
  144.     echo shar: \"'transfig/README'\" unpacked with wrong size!
  145. fi
  146. # end of 'transfig/README'
  147. fi
  148. if test -f 'transfig/VERSION' -a "${1}" != "-c" ; then 
  149.   echo shar: Will not clobber existing file \"'transfig/VERSION'\"
  150. else
  151. echo shar: Extracting \"'transfig/VERSION'\" \(31 characters\)
  152. sed "s/^X//" >'transfig/VERSION' <<'END_OF_FILE'
  153. XTransFig Version 2.0 Release 1
  154. END_OF_FILE
  155. if test 31 -ne `wc -c <'transfig/VERSION'`; then
  156.     echo shar: \"'transfig/VERSION'\" unpacked with wrong size!
  157. fi
  158. # end of 'transfig/VERSION'
  159. fi
  160. if test ! -d 'transfig/doc' ; then
  161.     echo shar: Creating directory \"'transfig/doc'\"
  162.     mkdir 'transfig/doc'
  163. fi
  164. if test ! -d 'transfig/doc/manual' ; then
  165.     echo shar: Creating directory \"'transfig/doc/manual'\"
  166.     mkdir 'transfig/doc/manual'
  167. fi
  168. if test -f 'transfig/doc/manual/Makefile' -a "${1}" != "-c" ; then 
  169.   echo shar: Will not clobber existing file \"'transfig/doc/manual/Makefile'\"
  170. else
  171. echo shar: Extracting \"'transfig/doc/manual/Makefile'\" \(219 characters\)
  172. sed "s/^X//" >'transfig/doc/manual/Makefile' <<'END_OF_FILE'
  173. X# 
  174. X# Makefile: TransFig makefile for translation of figures into latex
  175. X# 
  176. Xall: tex-list
  177. Xtrans.tex: trans.fig
  178. X    fig2dev -Llatex  trans.fig trans.tex
  179. Xtex-list: trans.tex
  180. Xtrans.tex: Makefile
  181. Xclean:
  182. X    rm -f trans.tex
  183. END_OF_FILE
  184. if test 219 -ne `wc -c <'transfig/doc/manual/Makefile'`; then
  185.     echo shar: \"'transfig/doc/manual/Makefile'\" unpacked with wrong size!
  186. fi
  187. # end of 'transfig/doc/manual/Makefile'
  188. fi
  189. if test -f 'transfig/doc/manual/README' -a "${1}" != "-c" ; then 
  190.   echo shar: Will not clobber existing file \"'transfig/doc/manual/README'\"
  191. else
  192. echo shar: Extracting \"'transfig/doc/manual/README'\" \(434 characters\)
  193. sed "s/^X//" >'transfig/doc/manual/README' <<'END_OF_FILE'
  194. XThis directory contains a manual which describes TransFig and how to use it.
  195. XThe manual includes TransFig figures, which have been translated into
  196. XLaTeX picture environment commands.  To generate the manual, just run
  197. X"latex manual".
  198. X
  199. XFor purposes of mailing, the Fig code file trans.fig may have been 
  200. Xommited from this directory.  In its place is the uuencoded version
  201. Xtrans.fig.uu.  To unpack it, just run "uudecode <trans.fig.uu".
  202. END_OF_FILE
  203. if test 434 -ne `wc -c <'transfig/doc/manual/README'`; then
  204.     echo shar: \"'transfig/doc/manual/README'\" unpacked with wrong size!
  205. fi
  206. # end of 'transfig/doc/manual/README'
  207. fi
  208. if test -f 'transfig/doc/manual/setup12.tex' -a "${1}" != "-c" ; then 
  209.   echo shar: Will not clobber existing file \"'transfig/doc/manual/setup12.tex'\"
  210. else
  211. echo shar: Extracting \"'transfig/doc/manual/setup12.tex'\" \(1385 characters\)
  212. sed "s/^X//" >'transfig/doc/manual/setup12.tex' <<'END_OF_FILE'
  213. X% Set up LaTeX for an article.
  214. X% This should work for LaTeX 2.08.
  215. X% This file contains everything up to
  216. X% the \begin{document} command,
  217. X% and should be read in with an \input command.
  218. X\documentstyle[12pt,threepart]{article}
  219. X
  220. X% Formatting niceties.
  221. X
  222. X% ensure that all pages are the same length
  223. X\flushbottom{}
  224. X
  225. X% bump up the widow and club penalties
  226. X\makeatletter
  227. X\clubpenalty=\@highpenalty
  228. X\widowpenalty=\@highpenalty
  229. X\makeatother
  230. X
  231. X% save the value of \baselinestretch (this is the global default)
  232. X\let\BLS=\baselinestretch
  233. X% These allow switching interline spacing.  The size changes ensure that the
  234. X% change takes effect immediately.
  235. X\makeatletter
  236. X\newcommand{\singlespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1}\tiny\CS}
  237. X\newcommand{\doublespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.75}\tiny\CS}
  238. X\newcommand{\normalspacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{\BLS}\tiny\CS}
  239. X\makeatother
  240. X
  241. X% undo LaTeX's decision to make citation labels be \hbox'd.
  242. X\makeatletter
  243. X\def\@cite#1#2{[#1\if@tempswa , #2\fi]}
  244. X\makeatother
  245. X
  246. X
  247. X\setlength{\unitlength}{1mm}
  248. X
  249. X% Number footnotes with symbols.
  250. X\fnsymbol{footnote}
  251. X
  252. X\newtheorem{theorem}{Theorem}
  253. X\newtheorem{lemma}{Lemma}
  254. X\newtheorem{corollary}{Corollary}
  255. X\newtheorem{definition}{Definition}
  256. X
  257. X% Definition of the proof-environment:
  258. X\newenvironment{proof}{{\bf Proof:}\quad}{\hfill$\Box$\newline}
  259. X
  260. END_OF_FILE
  261. if test 1385 -ne `wc -c <'transfig/doc/manual/setup12.tex'`; then
  262.     echo shar: \"'transfig/doc/manual/setup12.tex'\" unpacked with wrong size!
  263. fi
  264. # end of 'transfig/doc/manual/setup12.tex'
  265. fi
  266. if test -f 'transfig/doc/manual/threepart.sty' -a "${1}" != "-c" ; then 
  267.   echo shar: Will not clobber existing file \"'transfig/doc/manual/threepart.sty'\"
  268. else
  269. echo shar: Extracting \"'transfig/doc/manual/threepart.sty'\" \(1428 characters\)
  270. sed "s/^X//" >'transfig/doc/manual/threepart.sty' <<'END_OF_FILE'
  271. X% Three part head and foot macros. 1/87
  272. X% Lance Berc
  273. X% Olsen & Associates    mcvax!unizh!olsen!lance@seismo.css.gov
  274. X% Seefeldstrasse 233
  275. X% CH-8008 Zurich
  276. X
  277. X% How users can set the head and foot text.
  278. X\def\lhead#1{\gdef\@lhead{#1}} \def\lfoot#1{\gdef\@lfoot{#1}}
  279. X\def\chead#1{\gdef\@chead{#1}} \def\cfoot#1{\gdef\@cfoot{#1}}
  280. X\def\rhead#1{\gdef\@rhead{#1}} \def\rfoot#1{\gdef\@rfoot{#1}}
  281. X
  282. X% Initialization of the head and foot text.
  283. X% By default the page number is at the center of the foot and everything
  284. X% else is empty.
  285. X\def\@lhead{} \def\@lfoot{}
  286. X\def\@chead{} \def\@cfoot{{\rm \thepage}}
  287. X\def\@rhead{} \def\@rfoot{}
  288. X
  289. X% Put together a three part header or footer given the left, center and
  290. X% right text. The \lap commands put the text into an hbox of zero size,
  291. X% so overlapping text is not detected (it just overlaps).
  292. X\def\@threepart#1#2#3{\rlap{#1} \hfil {#2} \hfil \llap{#3}}
  293. X
  294. X% Swap the notices on odd and even pages when twosided.
  295. X\def\ps@threepartheadings
  296. X    {
  297. X    \def\@oddhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  298. X    \def\@oddfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  299. X
  300. X    \if@twoside
  301. X    \def\@evenhead{\@threepart{\@rhead}{\@chead}{\@lhead}}
  302. X    \def\@evenfoot{\@threepart{\@rfoot}{\@cfoot}{\@lfoot}}
  303. X    \else
  304. X    \def\@evenhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  305. X    \def\@evenfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  306. X    \fi
  307. X    }
  308. X
  309. X% Default page style
  310. X\ps@threepartheadings
  311. X
  312. X% Default footers
  313. X\cfoot{\thepage}
  314. END_OF_FILE
  315. if test 1428 -ne `wc -c <'transfig/doc/manual/threepart.sty'`; then
  316.     echo shar: \"'transfig/doc/manual/threepart.sty'\" unpacked with wrong size!
  317. fi
  318. # end of 'transfig/doc/manual/threepart.sty'
  319. fi
  320. if test -f 'transfig/doc/manual/trans.fig.uu' -a "${1}" != "-c" ; then 
  321.   echo shar: Will not clobber existing file \"'transfig/doc/manual/trans.fig.uu'\"
  322. else
  323. echo shar: Extracting \"'transfig/doc/manual/trans.fig.uu'\" \(3346 characters\)
  324. sed "s/^X//" >'transfig/doc/manual/trans.fig.uu' <<'END_OF_FILE'
  325. Xbegin 644 trans.fig
  326. XM(T9)1R Q+C0M5$98"C@P(#(*,B Q(# @,2 P(# @," P(# N,# P(#$@, H)
  327. XM," P(#$N,# P(#0N,# P(#@N,# P"@D@-#,Y(#$Y-" S,SD@,C$Y(#DY.3D@
  328. XM.3DY.0HR(#$@," Q(# @," P(# @,"XP,# @,2 P"@DP(# @,2XP,# @-"XP
  329. XM,# @."XP,# *"2 Q-3D@,3DT(#(U.2 R,3D@.3DY.2 Y.3DY"C(@,B Q(#$@
  330. XM," P(# @," T+C P," P(# *"2 T-CD@,3<P(#0V.2 Q.#D@-# Y(#$X.2 T
  331. XM,#D@,3<P(#0V.2 Q-S @.3DY.2 Y.3DY"C(@,2 P(#$@," P(# @," P+C P
  332. XM," Q(# *"3 @," Q+C P," T+C P," X+C P, H)(#,Q-2 R.#(@,S@U(#,Q
  333. XM-R Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(# N,# P(#$@, H)," P(#$N
  334. XM,# P(#0N,# P(#@N,# P"@D@,CDY(#(S.2 R.3D@,C4T(#DY.3D@.3DY.0HR
  335. XM(#$@," Q(# @," P(# @-"XP,# @,2 P"@DP(# @,2XP,# @-"XP,# @."XP
  336. XM,# *"2 R-3<@,C@P(#$T," S,3D@.3DY.2 Y.3DY"C(@,2 P(#$@," P(# @
  337. XM," T+C P," Q(# *"3 @," Q+C P," T+C P," X+C P, H)(#(X,R R.#(@
  338. XM,C$S(#,Q-R Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(#0N,# P(#$@, H)
  339. XM," P(#$N,# P(#0N,# P(#@N,# P"@D@,CDY(#(X,B R.3D@,S$W(#DY.3D@
  340. XM.3DY.0HR(#(@," Q(# @-3$Y(# @," P+C P," P(# *"2 R-CD@,C4Y(#(V
  341. XM.2 R-SD@,S(Y(#(W.2 S,CD@,C4Y(#(V.2 R-3D@.3DY.2 Y.3DY"C(@,2 P
  342. XM(#$@," P(# @," T+C P," Q(# *"3 @," Q+C P," T+C P," X+C P, H)
  343. XM(#,S.2 R-SD@-#4Y(#,Q.2 Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(# N
  344. XM,# P(#$@, H)," P(#$N,# P(#0N,# P(#@N,# P"@D@,CDY(#$Y-" R.3D@
  345. XM,C$Y(#DY.3D@.3DY.0HR(#$@," Q(# @," P(# @,"XP,# @," Q"@DP(# @
  346. XM,2XP,# @-"XP,# @."XP,# *"2 S,3D@,C$Y(#,V.2 Q.30@.3DY.2 Y.3DY
  347. XM"C(@,2 P(#$@," P(# @," P+C P," Q(# *"3 @," Q+C P," T+C P," X
  348. XM+C P, H)(#(R.2 Q.30@,C<Y(#(Q.2 Y.3DY(#DY.3D*,B Q(# @,2 P(# @
  349. XM," P(#0N,# P(#$@, H)," P(#$N,# P(#0N,# P(#@N,# P"@D@-#4Y(#,T
  350. XM," T-3D@,S4U(#DY.3D@.3DY.0HR(#(@,2 Q(# @," P(# @-"XP,# @," P
  351. XM"@D@-#@Y(#,U.2 T.#D@,S<Y(#0R.2 S-SD@-#(Y(#,U.2 T.#D@,S4Y(#DY
  352. XM.3D@.3DY.0HR(#$@," Q(# @," P(# @-"XP,# @,2 P"@DP(# @,2XP,# @
  353. XM-"XP,# @."XP,# *"2 T-3D@,S@T(#0U.2 S.3D@.3DY.2 Y.3DY"C(@,B Q
  354. XM(#$@," P(# @," T+C P," P(# *"2 Q.#D@,3<P(#$X.2 Q.#D@,3(Y(#$X
  355. XM.2 Q,CD@,3<P(#$X.2 Q-S @.3DY.2 Y.3DY"C(@,B Q(#$@," U,3D@," P
  356. XM(#0N,# P(# @, H)(#(U.2 Q-CD@,C4Y(#$X.2 Q.3D@,3@Y(#$Y.2 Q-CD@
  357. XM,C4Y(#$V.2 Y.3DY(#DY.3D*,B R(#$@,2 P(# @," P(#0N,# P(# @, H)
  358. XM(#,R.2 Q-S @,S(Y(#$X.2 R-CD@,3@Y(#(V.2 Q-S @,S(Y(#$W," Y.3DY
  359. XM(#DY.3D*,B R(#$@,2 P(# @," P(#0N,# P(# @, H)(#,Y.2 Q-S @,SDY
  360. XM(#$X.2 S,SD@,3@Y(#,S.2 Q-S @,SDY(#$W," Y.3DY(#DY.3D*-" Q(# @
  361. XM," P(# @," P+C P," P(#$V(#8T(#0S.2 Q.#(@>&%P9W)A<&@!"C0@,2 P
  362. XM(# @," P(# @,"XP,# @," Q-B U-B R,CD@,3@R(&=N=7!L;W0!"C0@,2 P
  363. XM(# @," P(# @,"XP,# @," Q-B V-" S-CD@,3@R('!L;W0R9FEG 0HT(#$@
  364. XM," P(# @," P(# N,# P(#$@,38@-38@,CDY(#(W,R!F:6<R9&5V 0HT(#$@
  365. XM,2 P(# @," P(# N,# P(#$@,38@-C0@,S<Y(#,T.2!C;VUM86YD<P$*-" Q
  366. XM(#$@," P(# @," P+C P," Q(#$V(#4V(#,W.2 S,S,@*$4I15!)0P$*-" Q
  367. XM(#$@," P(# @," P+C P," P(#$V(#0X(#(Q.2 S-#@@4V-R:7!T 0HT(#$@
  368. XM,2 P(# @," P(# N,# P(# @,38@,S(@,C$Y(#,S,B!0;W-T 0HT(#$@,2 P
  369. XM(# @," P(# N,# P(# @,38@-#@@,3,V(#,S,R!0:4-495@!"C0@,2 Q(# @
  370. XM," P(# @,"XP,# @," Q-B T." Q,S<@,S0X(&UA8W)O<P$*-" Q(#$@," P
  371. XM(# @," P+C P," Q(#$V(#0P(#(Y.2 S,S,@3&%495@!"C0@,2 Q(# @," P
  372. XM(# @,"XP,# @,2 Q-B V-" R.3D@,S0Y(&-O;6UA;F1S 0HT(#$@,2 P(# @
  373. XM," P(# N,# P(# @,38@-C0@,S Q(#(S,R!&:6<@8V]D90$*-" Q(#$@," P
  374. XM(# @," P+C P," Q(#$V(#,R(#0U.2 T,3,@='!I8P$*-" Q(#$@," P(# @
  375. XM," P+C P," Q(#$V(#8T(#0U.2 T,S @<W!E8VEA;',!"C0@,2 Q(# @," P
  376. XM(# @,"XP,# @,2 Q-B R-" T-3D@,S,S(%!)0P$*-" Q(# @," P(# @," P
  377. XM+C P," Q(#$V(#,R(#0U.2 S-S(@='!I8P$*-" Q(# @," P(# @," P+C P
  378. XM," P(#$V(#(T(#$U.2 Q.#(@9FEG 0HT(#$@," P(# @," P(# N,# P(# @
  379. X7,38@-38@,CDY(#$X,B!P:6,R9FEG 0HT
  380. Xend
  381. END_OF_FILE
  382. if test 3346 -ne `wc -c <'transfig/doc/manual/trans.fig.uu'`; then
  383.     echo shar: \"'transfig/doc/manual/trans.fig.uu'\" unpacked with wrong size!
  384. fi
  385. # end of 'transfig/doc/manual/trans.fig.uu'
  386. fi
  387. if test -f 'transfig/doc/manual/trans.tex' -a "${1}" != "-c" ; then 
  388.   echo shar: Will not clobber existing file \"'transfig/doc/manual/trans.tex'\"
  389. else
  390. echo shar: Extracting \"'transfig/doc/manual/trans.tex'\" \(2190 characters\)
  391. sed "s/^X//" >'transfig/doc/manual/trans.tex' <<'END_OF_FILE'
  392. X\setlength{\unitlength}{0.0125in}%
  393. X\begin{picture}(379,264)(113,409)
  394. X\thicklines
  395. X\put(270,560){\framebox(60,20){}}
  396. X\put(200,650){\dashbox{4}(60,20){}}
  397. X\put(258,559){\vector(-3,-1){117}}
  398. X\put(410,650){\dashbox{4}(60,19){}}
  399. X\put(316,557){\vector( 2,-1){ 70}}
  400. X\put(300,600){\vector( 0,-1){ 15}}
  401. X\put(284,557){\vector(-2,-1){ 70}}
  402. X\put(300,557){\vector( 0,-1){ 35}}
  403. X\put(160,645){\vector( 4,-1){100}}
  404. X\put(440,645){\vector(-4,-1){100}}
  405. X\put(300,645){\vector( 0,-1){ 25}}
  406. X\put(370,645){\vector(-2,-1){ 50}}
  407. X\put(230,645){\vector( 2,-1){ 50}}
  408. X\put(460,499){\vector( 0,-1){ 15}}
  409. X\put(430,460){\dashbox{4}(60,20){}}
  410. X\put(460,455){\vector( 0,-1){ 15}}
  411. X\put(130,650){\dashbox{4}(60,19){}}
  412. X\put(340,560){\vector( 3,-1){120}}
  413. X\put(270,650){\dashbox{4}(60,19){}}
  414. X\put(340,650){\dashbox{4}(60,19){}}
  415. X\put(440,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm xapgraph}}}
  416. X\put(230,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm gnuplot}}}
  417. X\put(370,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm plot2fig}}}
  418. X\put(300,566){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm fig2dev}}}
  419. X\put(380,490){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm commands}}}
  420. X\put(380,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm (E)EPIC}}}
  421. X\put(220,491){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Script}}}
  422. X\put(220,507){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Post}}}
  423. X\put(137,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm PiCTeX}}}
  424. X\put(138,491){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm macros}}}
  425. X\put(300,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm LaTeX}}}
  426. X\put(300,490){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm commands}}}
  427. X\put(302,606){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Fig code}}}
  428. X\put(460,426){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm tpic}}}
  429. X\put(460,409){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm specials}}}
  430. X\put(460,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm PIC}}}
  431. X\put(460,467){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm tpic}}}
  432. X\put(160,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm fig}}}
  433. X\put(300,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm pic2fig}}}
  434. X\end{picture}
  435. END_OF_FILE
  436. if test 2190 -ne `wc -c <'transfig/doc/manual/trans.tex'`; then
  437.     echo shar: \"'transfig/doc/manual/trans.tex'\" unpacked with wrong size!
  438. fi
  439. # end of 'transfig/doc/manual/trans.tex'
  440. fi
  441. if test -f 'transfig/doc/manual/transfig.tex' -a "${1}" != "-c" ; then 
  442.   echo shar: Will not clobber existing file \"'transfig/doc/manual/transfig.tex'\"
  443. else
  444. echo shar: Extracting \"'transfig/doc/manual/transfig.tex'\" \(38 characters\)
  445. sed "s/^X//" >'transfig/doc/manual/transfig.tex' <<'END_OF_FILE'
  446. X\typeout{TransFig: figures in LaTeX.}
  447. END_OF_FILE
  448. if test 38 -ne `wc -c <'transfig/doc/manual/transfig.tex'`; then
  449.     echo shar: \"'transfig/doc/manual/transfig.tex'\" unpacked with wrong size!
  450. fi
  451. # end of 'transfig/doc/manual/transfig.tex'
  452. fi
  453. if test -f 'transfig/doc/transfig.1' -a "${1}" != "-c" ; then 
  454.   echo shar: Will not clobber existing file \"'transfig/doc/transfig.1'\"
  455. else
  456. echo shar: Extracting \"'transfig/doc/transfig.1'\" \(1886 characters\)
  457. sed "s/^X//" >'transfig/doc/transfig.1' <<'END_OF_FILE'
  458. X.TH TRANSFIG 1 "29 March 1989"
  459. X.SH NAME
  460. Xtransfig \- creates a makefile for portable LaTeX figures
  461. X.SH SYNOPSIS
  462. X.B transfig
  463. X[ -L \fIlanguage\fR ]
  464. X[ -M \fImakefile\fR ]
  465. X[ -T \fItexfile\fR ]
  466. X[ \fIcontrol_specs\fR figfile ... ] ...]
  467. X.SH DESCRIPTION
  468. X.I Transfig
  469. Xcreates a makefile to translate figures described in Fig code, PostScript,
  470. Xor PIC into a specified LaTeX graphics \fIlanguage\fR.
  471. XPostScript and PIC files are identified by the suffixes ".ps" and ".pic"
  472. Xrespectively;
  473. XFig files can be specified either with or without the suffix ".fig" .
  474. XTransfig also creates a TeX macro file appropriate to the target language.
  475. X.SH OPTIONS
  476. XThe \fIlanguage\fR specifier must be either
  477. X.T
  478. X.BR epic ,
  479. X.BR eepic ,
  480. X.BR eepicemu ,
  481. X.BR latex ,
  482. X.BR pictex ,
  483. X.BR ps ,
  484. X.BR psfig ,
  485. X.BR tpic ,
  486. Xor
  487. X.BR null .
  488. XThe specifier
  489. X.B psfig
  490. Xis like the 
  491. X.B ps
  492. Xspecifier, except that it
  493. Xmake use of the psfig macro package.
  494. XThe specifier 
  495. X.B null
  496. Xresults in the figures being replaced by empty boxes of the
  497. Xappropriate size.
  498. XIf no language is specified,
  499. X.B epic
  500. Xis the default.
  501. X.PP
  502. XThe names of the makefile and TeX macro file can be set with the
  503. X-M and -T options.
  504. XThe default names are "Makefile" and "transfig.tex", respectively.
  505. X.PP
  506. XControl specifiers are 
  507. X.TP
  508. X\fB\-m\fI mag\fR
  509. Xset the magnification at which the figure is rendered (default 1.0).
  510. X.TP
  511. X\fB\-f\fI font\fR
  512. Xset the default font family used for text objects (default "\fBcmr\fR").
  513. X.TP
  514. X\fB\-s \fIfontsize\fR
  515. Xset the default font size (in points) for text objects (default 11*\fImag\fR).
  516. X.PP
  517. XIf there is no scaling, the default font is "\fB\\elvrm\fR".
  518. XLanguage and control specifiers may occur more than once;
  519. Xthey affect the translation of files which appear to their
  520. Xright in the argument list. 
  521. XIf no files are specified, then "*.fig" is assumed.
  522. X.SH "SEE ALSO"
  523. Xfig(1),
  524. Xfig2dev(1),
  525. Xpic(1),
  526. Xpic2fig(1),
  527. X.SH AUTHOR
  528. XMicah Beck (beck@svax.cs.cornell.edu)
  529. END_OF_FILE
  530. if test 1886 -ne `wc -c <'transfig/doc/transfig.1'`; then
  531.     echo shar: \"'transfig/doc/transfig.1'\" unpacked with wrong size!
  532. fi
  533. # end of 'transfig/doc/transfig.1'
  534. fi
  535. if test ! -d 'transfig/fig2dev' ; then
  536.     echo shar: Creating directory \"'transfig/fig2dev'\"
  537.     mkdir 'transfig/fig2dev'
  538. fi
  539. if test -f 'transfig/fig2dev/Makefile' -a "${1}" != "-c" ; then 
  540.   echo shar: Will not clobber existing file \"'transfig/fig2dev/Makefile'\"
  541. else
  542. echo shar: Extracting \"'transfig/fig2dev/Makefile'\" \(784 characters\)
  543. sed "s/^X//" >'transfig/fig2dev/Makefile' <<'END_OF_FILE'
  544. X#    Fig2dev : General Fig code translation program
  545. X#
  546. X#    Micah Beck
  547. X#    Modified from f2ps
  548. X#
  549. X
  550. X#
  551. X# to include drivers for the following langauges, 
  552. X# add the corresponding symbol to the DRIVERS list
  553. X#
  554. X# DRIVERS = -DEPIC -DLATEX -DPIC  -DPICTEX -DPS
  555. X#
  556. XDRIVERS = -DEPIC -DLATEX -DPIC  -DPICTEX -DPS
  557. X
  558. XFIGOBJ = arrow.o bound.o free.o read.o read1_3.o latex_line.o
  559. XOBJ = fig2dev.o getopt.o $(FIGOBJ)
  560. X
  561. XLIB = lib$(TARGET_ARCH).a
  562. XLIBS = dev/$(LIB)
  563. X
  564. X#CFLAGS =  -g $(DRIVERS)
  565. XCFLAGS = -O $(DRIVERS)
  566. X
  567. XTARGET = fig2dev$(TARGET_ARCH)
  568. X
  569. X$(TARGET): $(OBJ) $(LIBS) 
  570. X    $(CC) $(TARGET_ARCH) $(OBJ) $(LIBS) -lm -o $(TARGET)
  571. X
  572. X$(LIBS): always
  573. X    (cd dev; make)
  574. X
  575. X$(OBJ): fig2dev.h drivers.h
  576. X
  577. X
  578. X#########
  579. Xalways:
  580. X
  581. Xtidy: 
  582. X    rm -f *.o
  583. X    (cd dev; make tidy)
  584. X
  585. Xclean : 
  586. X    rm -f *.o fig2dev fig2dev-* core
  587. X    (cd dev; make clean)
  588. END_OF_FILE
  589. if test 784 -ne `wc -c <'transfig/fig2dev/Makefile'`; then
  590.     echo shar: \"'transfig/fig2dev/Makefile'\" unpacked with wrong size!
  591. fi
  592. # end of 'transfig/fig2dev/Makefile'
  593. fi
  594. if test -f 'transfig/fig2dev/NOTES' -a "${1}" != "-c" ; then 
  595.   echo shar: Will not clobber existing file \"'transfig/fig2dev/NOTES'\"
  596. else
  597. echo shar: Extracting \"'transfig/fig2dev/NOTES'\" \(1019 characters\)
  598. sed "s/^X//" >'transfig/fig2dev/NOTES' <<'END_OF_FILE'
  599. XA brief history of Fig translation programs.
  600. X
  601. XFig2dev is derived from f2p, the original program written by the author of Fig,
  602. XSupoj Sutanthavibul of the University of Texas at Austin, to translate Fig
  603. Xcode to PIC.  The devlopment is somewhat complex.
  604. X
  605. XSupoj adapted f2p for PostScript ouput: f2ps.
  606. X
  607. XI adapted f2p for PiCTeX output: fig2tex.
  608. X
  609. XFrank Schmuck, then a graduate student at Cornell, adapted fig2tex for
  610. XLaTeX picture environment output: fig2latex.
  611. X
  612. XFrank also enhanced Fig, giving us Fig-FS.  I in turn extended the
  613. Xdefinition of Fig code and added corresponding features to Fig-FS.
  614. XI implemented this extension (TFX) in fig2tex, and in fig2ps, which
  615. Xis an adaption of f2ps.
  616. X
  617. XConrad Kwok, then of the University of California at Davis, adapted
  618. Xfig2tex for (E)EPIC output: fig2epic.
  619. X
  620. XHe also enhanced f2p to support the TFX extension: fig2pic.
  621. X
  622. XI have now reorganized the five programs named fig2* into drivers for
  623. Xa single tranlation program: fig2dev.
  624. X
  625. XMicah Beck
  626. XCornell Dept. of Computer Science
  627. X6 May 1989
  628. END_OF_FILE
  629. if test 1019 -ne `wc -c <'transfig/fig2dev/NOTES'`; then
  630.     echo shar: \"'transfig/fig2dev/NOTES'\" unpacked with wrong size!
  631. fi
  632. # end of 'transfig/fig2dev/NOTES'
  633. fi
  634. if test -f 'transfig/fig2dev/alloc.h' -a "${1}" != "-c" ; then 
  635.   echo shar: Will not clobber existing file \"'transfig/fig2dev/alloc.h'\"
  636. else
  637. echo shar: Extracting \"'transfig/fig2dev/alloc.h'\" \(640 characters\)
  638. sed "s/^X//" >'transfig/fig2dev/alloc.h' <<'END_OF_FILE'
  639. Xextern char    *malloc();
  640. Xextern char    *calloc();
  641. X
  642. X#define        Line_malloc(z)        z = (F_line*)malloc(LINOBJ_SIZE)
  643. X#define        Spline_malloc(z)    z = (F_spline*)malloc(SPLOBJ_SIZE)
  644. X#define        Ellipse_malloc(z)    z = (F_ellipse*)malloc(ELLOBJ_SIZE)
  645. X#define        Arc_malloc(z)        z = (F_arc*)malloc(ARCOBJ_SIZE)
  646. X#define        Compound_malloc(z)    z = (F_compound*)malloc(COMOBJ_SIZE)
  647. X#define        Text_malloc(z)        z = (F_text*)malloc(TEXOBJ_SIZE)
  648. X#define        Point_malloc(z)        z = (F_point*)malloc(POINT_SIZE)
  649. X#define        Control_malloc(z)    z = (F_control*)malloc(CONTROL_SIZE)
  650. X#define        Arrow_malloc(z)        z = (F_arrow*)malloc(ARROW_SIZE)
  651. X
  652. Xextern char    Err_mem[];
  653. Xextern char    Err_incomp[];
  654. END_OF_FILE
  655. if test 640 -ne `wc -c <'transfig/fig2dev/alloc.h'`; then
  656.     echo shar: \"'transfig/fig2dev/alloc.h'\" unpacked with wrong size!
  657. fi
  658. # end of 'transfig/fig2dev/alloc.h'
  659. fi
  660. if test -f 'transfig/fig2dev/arrow.c' -a "${1}" != "-c" ; then 
  661.   echo shar: Will not clobber existing file \"'transfig/fig2dev/arrow.c'\"
  662. else
  663. echo shar: Extracting \"'transfig/fig2dev/arrow.c'\" \(1366 characters\)
  664. sed "s/^X//" >'transfig/fig2dev/arrow.c' <<'END_OF_FILE'
  665. X#include <stdio.h>
  666. X#include "alloc.h"
  667. X#include "object.h"
  668. X
  669. Xstatic double        forward_arrow_wid = 4;
  670. Xstatic double        forward_arrow_ht = 8;
  671. Xstatic int        forward_arrow_type = 0;
  672. Xstatic int        forward_arrow_style = 0;
  673. Xstatic double        forward_arrow_thickness = 1;
  674. X
  675. Xstatic double        backward_arrow_wid = 4;
  676. Xstatic double        backward_arrow_ht = 8;
  677. Xstatic int        backward_arrow_type = 0;
  678. Xstatic int        backward_arrow_style = 0;
  679. Xstatic double        backward_arrow_thickness = 1;
  680. X
  681. XF_arrow *
  682. Xforward_arrow()
  683. X{
  684. X    F_arrow        *a;
  685. X
  686. X    if (NULL == (Arrow_malloc(a))) {
  687. X        put_msg(Err_mem);
  688. X        return(NULL);
  689. X        }
  690. X    a->type = forward_arrow_type;
  691. X    a->style = forward_arrow_style;
  692. X    a->thickness = forward_arrow_thickness;
  693. X    a->wid = forward_arrow_wid;
  694. X    a->ht = forward_arrow_ht;
  695. X    return(a);
  696. X    }
  697. X
  698. XF_arrow *
  699. Xbackward_arrow()
  700. X{
  701. X    F_arrow        *a;
  702. X
  703. X    if (NULL == (Arrow_malloc(a))) {
  704. X        put_msg(Err_mem);
  705. X        return(NULL);
  706. X        }
  707. X    a->type = backward_arrow_type;
  708. X    a->style = backward_arrow_style;
  709. X    a->thickness = backward_arrow_thickness;
  710. X    a->wid = backward_arrow_wid;
  711. X    a->ht = backward_arrow_ht;
  712. X    return(a);
  713. X    }
  714. X
  715. XF_arrow *
  716. Xmake_arrow(type, style, thickness, wid, ht)
  717. Xint    type, style;
  718. Xdouble    thickness, wid, ht;
  719. X{
  720. X    F_arrow        *a;
  721. X
  722. X    if (NULL == (Arrow_malloc(a))) {
  723. X        put_msg(Err_mem);
  724. X        return(NULL);
  725. X        }
  726. X    a->type = type;
  727. X    a->style = style;
  728. X    a->thickness = thickness;
  729. X    a->wid = wid;
  730. X    a->ht = ht;
  731. X    return(a);
  732. X    }
  733. END_OF_FILE
  734. if test 1366 -ne `wc -c <'transfig/fig2dev/arrow.c'`; then
  735.     echo shar: \"'transfig/fig2dev/arrow.c'\" unpacked with wrong size!
  736. fi
  737. # end of 'transfig/fig2dev/arrow.c'
  738. fi
  739. if test ! -d 'transfig/fig2dev/dev' ; then
  740.     echo shar: Creating directory \"'transfig/fig2dev/dev'\"
  741.     mkdir 'transfig/fig2dev/dev'
  742. fi
  743. if test -f 'transfig/fig2dev/dev/Makefile' -a "${1}" != "-c" ; then 
  744.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/Makefile'\"
  745. else
  746. echo shar: Extracting \"'transfig/fig2dev/dev/Makefile'\" \(312 characters\)
  747. sed "s/^X//" >'transfig/fig2dev/dev/Makefile' <<'END_OF_FILE'
  748. X#
  749. X#    Fig2dev Driver Library Makefile
  750. X#
  751. X
  752. XINCLUDES = -I..
  753. X#CFLAGS = -g $(INCLUDES)
  754. XCFLAGS =  -O $(INCLUDES)
  755. X
  756. XOBJ =  genps.o genlatex.o genepic.o genpictex.o genpic.o genbox.o
  757. XLIB = lib$(TARGET_ARCH).a
  758. X
  759. X$(LIB) : $(OBJ)
  760. X    ar r $(LIB) $(OBJ)
  761. X    ranlib $(LIB)
  762. X
  763. X#########
  764. Xtidy: 
  765. X    rm -f *.o
  766. X
  767. Xclean :
  768. X    rm -f *.o core lib*.a
  769. X
  770. END_OF_FILE
  771. if test 312 -ne `wc -c <'transfig/fig2dev/dev/Makefile'`; then
  772.     echo shar: \"'transfig/fig2dev/dev/Makefile'\" unpacked with wrong size!
  773. fi
  774. # end of 'transfig/fig2dev/dev/Makefile'
  775. fi
  776. if test -f 'transfig/fig2dev/dev/genbox.c' -a "${1}" != "-c" ; then 
  777.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/genbox.c'\"
  778. else
  779. echo shar: Extracting \"'transfig/fig2dev/dev/genbox.c'\" \(800 characters\)
  780. sed "s/^X//" >'transfig/fig2dev/dev/genbox.c' <<'END_OF_FILE'
  781. X/* 
  782. X *    genbox : Empty box driver for fig2dev translator
  783. X *
  784. X*/
  785. X#include <stdio.h>
  786. X#include "object.h"
  787. X#include "fig2dev.h"
  788. X
  789. Xvoid genbox_option(opt, optarg)
  790. Xchar opt, *optarg;
  791. X{
  792. X      switch (opt) {
  793. X
  794. X    case 's':
  795. X    case 'f':
  796. X    case 'm':
  797. X    case 'L':
  798. X        break;
  799. X
  800. X     default:
  801. X        put_msg(Err_badarg, opt, "box");
  802. X        exit(1);
  803. X    }
  804. X}
  805. X
  806. Xvoid genbox_start(objects)
  807. XF_compound    *objects;
  808. X{
  809. X    double ppi;
  810. X
  811. X    if (0 == (ppi = (double)objects->nwcorner.x)) {
  812. X        fprintf(stderr, "Resolution is zero!! default to 80 ppi\n");
  813. X        ppi = 80.0;
  814. X        }
  815. X
  816. X    /* draw box */
  817. X        fprintf(tfp, "\\makebox[%.3fin]{\\rule{0in}{%.3fin}}\n",
  818. X        (urx-llx)*mag/ppi, (ury-lly)*mag/ppi);
  819. X    }
  820. X
  821. Xstruct driver dev_box = {
  822. X    genbox_option,
  823. X    genbox_start,
  824. X    gendev_null,
  825. X    gendev_null,
  826. X    gendev_null,
  827. X    gendev_null,
  828. X    gendev_null,
  829. X    gendev_null,
  830. X    INCLUDE_TEXT
  831. X};
  832. END_OF_FILE
  833. if test 800 -ne `wc -c <'transfig/fig2dev/dev/genbox.c'`; then
  834.     echo shar: \"'transfig/fig2dev/dev/genbox.c'\" unpacked with wrong size!
  835. fi
  836. # end of 'transfig/fig2dev/dev/genbox.c'
  837. fi
  838. if test -f 'transfig/fig2dev/dev/picfonts.h' -a "${1}" != "-c" ; then 
  839.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/picfonts.h'\"
  840. else
  841. echo shar: Extracting \"'transfig/fig2dev/dev/picfonts.h'\" \(458 characters\)
  842. sed "s/^X//" >'transfig/fig2dev/dev/picfonts.h' <<'END_OF_FILE'
  843. X/*  The selection of font names may be site dependent */
  844. X
  845. Xchar        *fontnames[] = {
  846. X            "R", "R",        /* default */
  847. X            "R",            /* roman */
  848. X            "B",            /* bold */
  849. X            "I",            /* italic */
  850. X            "H",            /* sans serif */
  851. X            "C"            /* typewriter */
  852. X        };
  853. X#define MAXFONT 5
  854. X#define MAXFONTSIZE 108
  855. X
  856. X#define PICFONT(F)    (fontnames[((F) <= MAXFONT) ? (F)+1 : MAXFONT])
  857. X#define PICFONTSIZE(S)  ((S) > 0 ? \
  858. X                ((S) <= MAXFONTSIZE ? \
  859. X                    (S) : \
  860. X                    MAXFONTSIZE) : \
  861. X                font_size)
  862. END_OF_FILE
  863. if test 458 -ne `wc -c <'transfig/fig2dev/dev/picfonts.h'`; then
  864.     echo shar: \"'transfig/fig2dev/dev/picfonts.h'\" unpacked with wrong size!
  865. fi
  866. # end of 'transfig/fig2dev/dev/picfonts.h'
  867. fi
  868. if test -f 'transfig/fig2dev/dev/texfonts.h' -a "${1}" != "-c" ; then 
  869.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/texfonts.h'\"
  870. else
  871. echo shar: Extracting \"'transfig/fig2dev/dev/texfonts.h'\" \(815 characters\)
  872. sed "s/^X//" >'transfig/fig2dev/dev/texfonts.h' <<'END_OF_FILE'
  873. Xstatic char        *fontnames[] = {
  874. X            "rm", "rm",        /* default */
  875. X            "rm",            /* roman */
  876. X            "bf",            /* bold */
  877. X            "it",            /* italic */
  878. X            "sf",             /* sans serif */
  879. X            "tt"            /* typewriter */
  880. X        };
  881. X#define MAXFONT 5
  882. X
  883. X/* The selection of font names may be site dependent.
  884. X * Not all fonts are preloaded at all sizes.
  885. X */
  886. X
  887. Xstatic char        *fontsizes[] = {
  888. X            "elv", "elv",        /* default */
  889. X            "fiv", "fiv", "fiv", "fiv",     /* small fonts */
  890. X            "fiv",            /* five point font */
  891. X            "six", "sev", "egt",    /* etc */
  892. X            "nin", "ten", "elv",
  893. X            "twl", "twl", "frtn",    
  894. X            "frtn", "frtn", "svtn",
  895. X            "svtn", "svtn", "twty",
  896. X            "twty", "twty", "twty", "twty", "twfv"
  897. X            };
  898. X#define MAXFONTSIZE 25
  899. X
  900. X#define TEXFONT(F)    (fontnames[((F) <= MAXFONT) ? (F)+1 : MAXFONT])
  901. X#define TEXFONTSIZE(S)    (fontsizes[((S) <= MAXFONTSIZE) ? (S)+1 : MAXFONTSIZE])
  902. END_OF_FILE
  903. if test 815 -ne `wc -c <'transfig/fig2dev/dev/texfonts.h'`; then
  904.     echo shar: \"'transfig/fig2dev/dev/texfonts.h'\" unpacked with wrong size!
  905. fi
  906. # end of 'transfig/fig2dev/dev/texfonts.h'
  907. fi
  908. if test -f 'transfig/fig2dev/drivers.h' -a "${1}" != "-c" ; then 
  909.   echo shar: Will not clobber existing file \"'transfig/fig2dev/drivers.h'\"
  910. else
  911. echo shar: Extracting \"'transfig/fig2dev/drivers.h'\" \(549 characters\)
  912. sed "s/^X//" >'transfig/fig2dev/drivers.h' <<'END_OF_FILE'
  913. Xextern struct driver dev_box;
  914. Xextern struct driver dev_epic;
  915. Xextern struct driver dev_latex;
  916. Xextern struct driver dev_pic;
  917. Xextern struct driver dev_pictex;
  918. Xextern struct driver dev_ps;
  919. X
  920. Xstruct 
  921. X    {char *name; struct driver *dev;}
  922. X    drivers[]
  923. X    = {
  924. X        {"box",        &dev_box}, 
  925. X#ifdef EPIC
  926. X        {"epic",    &dev_epic},
  927. X        {"eepic",    &dev_epic},
  928. X        {"eepicemu",    &dev_epic},
  929. X#endif
  930. X#ifdef LATEX
  931. X        {"latex",    &dev_latex},
  932. X#endif
  933. X#ifdef PIC
  934. X        {"pic",        &dev_pic},
  935. X#endif
  936. X#ifdef PICTEX
  937. X        {"pictex",    &dev_pictex},
  938. X#endif
  939. X#ifdef PS
  940. X        {"ps",        &dev_ps},
  941. X#endif
  942. X        {"",        NULL}
  943. X    };
  944. END_OF_FILE
  945. if test 549 -ne `wc -c <'transfig/fig2dev/drivers.h'`; then
  946.     echo shar: \"'transfig/fig2dev/drivers.h'\" unpacked with wrong size!
  947. fi
  948. # end of 'transfig/fig2dev/drivers.h'
  949. fi
  950. if test -f 'transfig/fig2dev/fig2dev.h' -a "${1}" != "-c" ; then 
  951.   echo shar: Will not clobber existing file \"'transfig/fig2dev/fig2dev.h'\"
  952. else
  953. echo shar: Extracting \"'transfig/fig2dev/fig2dev.h'\" \(727 characters\)
  954. sed "s/^X//" >'transfig/fig2dev/fig2dev.h' <<'END_OF_FILE'
  955. X/* 
  956. X * Device driver interface structure
  957. X */
  958. Xstruct driver {
  959. X     void (*option)();    /* interpret driver-specific options */
  960. X      void (*start)();    /* output file header */
  961. X    void (*arc)();        /* object generators */
  962. X    void (*ellipse)();
  963. X    void (*line)();
  964. X    void (*spline)();
  965. X    void (*text)();
  966. X    void (*end)();        /* output file trailer */
  967. X      int text_include;    /* include text length in bounding box */
  968. X#define INCLUDE_TEXT 1
  969. X#define EXCLUDE_TEXT 0
  970. X};
  971. X
  972. Xextern char *strchr();
  973. Xextern void fprintf(), fputc();
  974. X
  975. Xextern char Err_badarg[];
  976. Xextern char Err_incomp[];
  977. Xextern char Err_mem[];
  978. X
  979. Xextern char    *prog, *from;
  980. Xextern int    font_size;
  981. Xextern double    mag;
  982. Xextern FILE    *tfp;
  983. X
  984. Xextern int llx, lly, urx, ury, coord_system;
  985. X
  986. Xextern void gendev_null();
  987. END_OF_FILE
  988. if test 727 -ne `wc -c <'transfig/fig2dev/fig2dev.h'`; then
  989.     echo shar: \"'transfig/fig2dev/fig2dev.h'\" unpacked with wrong size!
  990. fi
  991. # end of 'transfig/fig2dev/fig2dev.h'
  992. fi
  993. if test -f 'transfig/fig2dev/fig2ps2tex' -a "${1}" != "-c" ; then 
  994.   echo shar: Will not clobber existing file \"'transfig/fig2dev/fig2ps2tex'\"
  995. else
  996. echo shar: Extracting \"'transfig/fig2dev/fig2ps2tex'\" \(456 characters\)
  997. sed "s/^X//" >'transfig/fig2dev/fig2ps2tex' <<'END_OF_FILE'
  998. X#! /bin/csh -f
  999. X#
  1000. X# Fig2ps2tex - generate a TeX file for including a PostScript file
  1001. X#         involves calculating the bounding box from fig2ps output
  1002. X#
  1003. Xset bbox = `grep "^%%BoundingBox:" $1`
  1004. X
  1005. Xset xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
  1006. Xset ysp = `echo "3k $bbox[5] $bbox[3] - 72 / p" | dc`
  1007. X
  1008. Xecho "\makebox[${xsp}in][l]{"
  1009. Xecho "  \vbox to ${ysp}in{"
  1010. Xecho "    \vfill"
  1011. Xecho "    \special{psfile=$1}"
  1012. Xecho "  }"
  1013. Xecho "  \vspace{-\baselineskip}"
  1014. Xecho "}"
  1015. END_OF_FILE
  1016. if test 456 -ne `wc -c <'transfig/fig2dev/fig2ps2tex'`; then
  1017.     echo shar: \"'transfig/fig2dev/fig2ps2tex'\" unpacked with wrong size!
  1018. fi
  1019. chmod +x 'transfig/fig2dev/fig2ps2tex'
  1020. # end of 'transfig/fig2dev/fig2ps2tex'
  1021. fi
  1022. if test -f 'transfig/fig2dev/free.c' -a "${1}" != "-c" ; then 
  1023.   echo shar: Will not clobber existing file \"'transfig/fig2dev/free.c'\"
  1024. else
  1025. echo shar: Extracting \"'transfig/fig2dev/free.c'\" \(2189 characters\)
  1026. sed "s/^X//" >'transfig/fig2dev/free.c' <<'END_OF_FILE'
  1027. X#include <stdio.h>
  1028. X#include <math.h>
  1029. X#include "object.h"
  1030. X
  1031. Xfree_arc(list)
  1032. XF_arc    **list;
  1033. X{
  1034. X    F_arc    *a, *arc;
  1035. X
  1036. X    for (a = *list; a != NULL;) {
  1037. X        arc = a;
  1038. X        a = a->next;
  1039. X        if (arc->for_arrow) free((char*)arc->for_arrow);
  1040. X        if (arc->back_arrow) free((char*)arc->back_arrow);
  1041. X        free((char*)arc);
  1042. X        } 
  1043. X    *list = NULL;
  1044. X    }
  1045. X
  1046. Xfree_compound(list)
  1047. XF_compound    **list;
  1048. X{
  1049. X    F_compound    *c, *compound;
  1050. X
  1051. X    for (c = *list; c != NULL;) {
  1052. X        compound = c;
  1053. X        c = c->next;
  1054. X        free_arc(&compound->arcs);
  1055. X        free_compound(&compound->compounds);
  1056. X        free_ellipse(&compound->ellipses);
  1057. X        free_line(&compound->lines);
  1058. X        free_spline(&compound->splines);
  1059. X        free_text(&compound->texts);
  1060. X        free((char*)compound);
  1061. X        } 
  1062. X    *list = NULL;
  1063. X    }
  1064. X
  1065. Xfree_ellipse(list)
  1066. XF_ellipse    **list;
  1067. X{
  1068. X    F_ellipse    *e, *ellipse;
  1069. X
  1070. X    for (e = *list; e != NULL;) {
  1071. X        ellipse = e;
  1072. X        e = e->next;
  1073. X        free((char*)ellipse);
  1074. X        } 
  1075. X    *list = NULL;
  1076. X    }
  1077. X
  1078. Xfree_line(list)
  1079. XF_line    **list;
  1080. X{
  1081. X    F_line    *l, *line;
  1082. X
  1083. X    for (l = *list; l != NULL;) {
  1084. X        line = l;
  1085. X        l = l->next;
  1086. X        free_linestorage(line);
  1087. X        } 
  1088. X    *list = NULL;
  1089. X    }
  1090. X
  1091. Xfree_text(list)
  1092. XF_text    **list;
  1093. X{
  1094. X    F_text    *t, *text;
  1095. X
  1096. X    for (t = *list; t != NULL;) {
  1097. X        text = t;
  1098. X        t = t->next;
  1099. X        cfree(text->cstring);
  1100. X        free((char*)text);
  1101. X        } 
  1102. X    *list = NULL;
  1103. X    }
  1104. X
  1105. Xfree_spline(list)
  1106. XF_spline    **list;
  1107. X{
  1108. X    F_spline    *s, *spline;
  1109. X
  1110. X    for (s = *list; s != NULL;) {
  1111. X        spline = s;
  1112. X        s = s->next;
  1113. X        free_splinestorage(spline);
  1114. X        }
  1115. X    *list = NULL;
  1116. X    }
  1117. X
  1118. Xfree_splinestorage(s)
  1119. XF_spline      *s;
  1120. X{
  1121. X        F_point        *p, *q;
  1122. X        F_control    *a, *b;
  1123. X
  1124. X        for (p = s->points; p != NULL; p = q) {
  1125. X            q = p->next;
  1126. X            free((char*)p);
  1127. X            }
  1128. X        for (a = s->controls; a != NULL; a = b) {
  1129. X            b = a->next;
  1130. X            free((char*)a);
  1131. X            }
  1132. X    if (s->for_arrow) free((char*)s->for_arrow);
  1133. X    if (s->back_arrow) free((char*)s->back_arrow);
  1134. X        free((char*)s);
  1135. X        }
  1136. X
  1137. Xfree_linestorage(l)
  1138. XF_line    *l;
  1139. X{
  1140. X    F_point    *p, *q;
  1141. X
  1142. X    for (p = l->points; p != NULL; p = q) {
  1143. X        q = p->next;
  1144. X        free((char*)p);
  1145. X        }
  1146. X    if (l->for_arrow) free((char*)l->for_arrow);
  1147. X    if (l->back_arrow) free((char*)l->back_arrow);
  1148. X    free((char*)l);
  1149. X    }
  1150. END_OF_FILE
  1151. if test 2189 -ne `wc -c <'transfig/fig2dev/free.c'`; then
  1152.     echo shar: \"'transfig/fig2dev/free.c'\" unpacked with wrong size!
  1153. fi
  1154. # end of 'transfig/fig2dev/free.c'
  1155. fi
  1156. if test -f 'transfig/fig2dev/getopt.c' -a "${1}" != "-c" ; then 
  1157.   echo shar: Will not clobber existing file \"'transfig/fig2dev/getopt.c'\"
  1158. else
  1159. echo shar: Extracting \"'transfig/fig2dev/getopt.c'\" \(2996 characters\)
  1160. sed "s/^X//" >'transfig/fig2dev/getopt.c' <<'END_OF_FILE'
  1161. X/*
  1162. X    I got this off net.sources from Henry Spencer.
  1163. X    It is a public domain getopt(3) like in System V.
  1164. X    I have made the following modifications:
  1165. X
  1166. X    index(s,c) was added because too many people could
  1167. X    not compile getopt without it.
  1168. X
  1169. X    A test main program was added, ifdeffed by GETOPT.
  1170. X    This main program is a public domain implementation
  1171. X    of the getopt(1) program like in System V.  The getopt
  1172. X    program can be used to standardize shell option handling.
  1173. X        e.g.  cc -DGETOPT getopt.c -o getopt
  1174. X*/
  1175. X#include <stdio.h>
  1176. X
  1177. X#ifndef lint
  1178. Xstatic    char    sccsfid[] = "@(#) getopt.c 5.0 (UTZoo) 1985";
  1179. X#endif
  1180. X
  1181. X#define    ARGCH    (int)':'
  1182. X#define BADCH     (int)'?'
  1183. X#define EMSG     ""
  1184. X#define    ENDARGS  "--"
  1185. X
  1186. X/* this is included because index is not on some UNIX systems */
  1187. Xstatic
  1188. Xchar *
  1189. Xindex (s, c)
  1190. Xregister    char    *s;
  1191. Xregister    int     c;
  1192. X    {
  1193. X    while (*s)
  1194. X        if (c == *s) return (s);
  1195. X        else s++;
  1196. X    return (NULL);
  1197. X    }
  1198. X
  1199. X/*
  1200. X * get option letter from argument vector
  1201. X */
  1202. Xint    opterr = 1,        /* useless, never set or used */
  1203. X    optind = 1,        /* index into parent argv vector */
  1204. X    optopt;            /* character checked for validity */
  1205. Xchar    *optarg;        /* argument associated with option */
  1206. X
  1207. X#define tell(s)    fputs(*nargv,stderr);fputs(s,stderr); \
  1208. X        fputc(optopt,stderr);fputc('\n',stderr);return(BADCH);
  1209. X
  1210. X
  1211. Xgetopt(nargc,nargv,ostr)
  1212. Xint    nargc;
  1213. Xchar    **nargv,
  1214. X    *ostr;
  1215. X{
  1216. X    static char    *place = EMSG;    /* option letter processing */
  1217. X    register char    *oli;        /* option letter list index */
  1218. X    char    *index();
  1219. X
  1220. X    if(!*place) {            /* update scanning pointer */
  1221. X        if(optind >= nargc || *(place = nargv[optind]) != '-' || !*++place) return(EOF);
  1222. X        if (*place == '-') {    /* found "--" */
  1223. X            ++optind;
  1224. X            return(EOF);
  1225. X        }
  1226. X    }                /* option letter okay? */
  1227. X    if ((optopt = (int)*place++) == ARGCH || !(oli = index(ostr,optopt))) {
  1228. X        if(!*place) ++optind;
  1229. X        tell(": illegal option -- ");
  1230. X    }
  1231. X    if (*++oli != ARGCH) {        /* don't need argument */
  1232. X        optarg = NULL;
  1233. X        if (!*place) ++optind;
  1234. X    }
  1235. X    else {                /* need an argument */
  1236. X        if (*place) optarg = place;    /* no white space */
  1237. X        else if (nargc <= ++optind) {    /* no arg */
  1238. X            place = EMSG;
  1239. X            tell(": option requires an argument -- ");
  1240. X        }
  1241. X         else optarg = nargv[optind];    /* white space */
  1242. X        place = EMSG;
  1243. X        ++optind;
  1244. X    }
  1245. X    return(optopt);            /* dump back option letter */
  1246. X}
  1247. X
  1248. X
  1249. X#ifdef GETOPT
  1250. X
  1251. X#ifndef lint
  1252. Xstatic    char    sccspid[] = "@(#) getopt.c 5.1 (WangInst) 6/15/85";
  1253. X#endif
  1254. X
  1255. Xmain (argc, argv) char **argv;
  1256. X    {
  1257. X    char    *optstring = argv[1];
  1258. X    char    *argv0 = argv[0];
  1259. X    extern    int     optind;
  1260. X    extern    char    *optarg;
  1261. X    int     opterr = 0;
  1262. X    int     C;
  1263. X    char    *opi;
  1264. X    if (argc == 1)
  1265. X        {
  1266. X        fprintf (stderr, "Usage: %s optstring args\n", argv0);
  1267. X        exit (1);
  1268. X        }
  1269. X    argv++;
  1270. X    argc--;
  1271. X    argv[0] = argv0;
  1272. X    while ((C = getopt (argc, argv, optstring)) != EOF)
  1273. X        {
  1274. X        if (C == BADCH) opterr++;
  1275. X        printf ("-%c ", C);
  1276. X        opi = index (optstring, C);
  1277. X        if (opi && opi[1] == ARGCH)
  1278. X            if (optarg)
  1279. X                printf ("\"%s\" ", optarg);
  1280. X            else opterr++;
  1281. X        }
  1282. X    printf ("%s", ENDARGS);
  1283. X    while (optind < argc)
  1284. X        printf (" \"%s\"", argv[optind++]);
  1285. X    putchar ('\n');
  1286. X    exit (opterr);
  1287. X    }
  1288. X
  1289. X#endif
  1290. END_OF_FILE
  1291. if test 2996 -ne `wc -c <'transfig/fig2dev/getopt.c'`; then
  1292.     echo shar: \"'transfig/fig2dev/getopt.c'\" unpacked with wrong size!
  1293. fi
  1294. # end of 'transfig/fig2dev/getopt.c'
  1295. fi
  1296. if test -f 'transfig/fig2dev/newfont.h' -a "${1}" != "-c" ; then 
  1297.   echo shar: Will not clobber existing file \"'transfig/fig2dev/newfont.h'\"
  1298. else
  1299. echo shar: Extracting \"'transfig/fig2dev/newfont.h'\" \(2809 characters\)
  1300. sed "s/^X//" >'transfig/fig2dev/newfont.h' <<'END_OF_FILE'
  1301. XReceived: from cu-arpa.cs.cornell.edu by loki.cs.cornell.edu (4.0/I-1.91f)
  1302. X    id AA13388; Fri, 21 Jul 89 12:48:10 EDT
  1303. XReceived: from thumper.bellcore.com by cu-arpa.cs.cornell.edu (5.61+2/1.91d)
  1304. X    id AA02218; Fri, 21 Jul 89 12:48:00 -0400
  1305. XReceived: by thumper.bellcore.com (5.54/4.7)
  1306. X    id AA07930; Fri, 21 Jul 89 12:47:12 EDT
  1307. XReceived: by dino.bellcore.com (4.12/4.7)
  1308. X    id AA10363; Fri, 21 Jul 89 12:49:10 edt
  1309. XDate: Fri, 21 Jul 89 12:49:10 edt
  1310. XFrom: dana@thumper.bellcore.com (Dana A. Chee)
  1311. XMessage-Id: <8907211649.AA10363@dino.bellcore.com>
  1312. XTo: beck@cs.cornell.edu (Micah Beck)
  1313. XIn-Reply-To: <8907191419.AA10822@utgard.cs.cornell.edu>
  1314. XSubject: Hello, Dana?
  1315. XStatus: R
  1316. X
  1317. XBelieve it or not, I haven't dropped off the face of the earth.  Yes
  1318. XI'm still working on it when time permits, and below is my font
  1319. Xscheme (with all ifdefs removed).  As you see, there are three
  1320. Xcomponents to a font, the face (font), style, and size.  Hope this
  1321. Xhelps you out (and hopefully an alpha of this will be out soon).
  1322. X
  1323. XDana
  1324. X
  1325. X
  1326. Xtypedef         struct f_text {
  1327. X                        int                     type;
  1328. X#define                                 T_LEFT_JUSTIFIED        0
  1329. X#define                                 T_CENTER_JUSTIFIED      1
  1330. X#define                                 T_RIGHT_JUSTIFIED       2
  1331. X                        int                     font;
  1332. X#define                                 TIMES                   0
  1333. X#define                                 HELVETICA               4
  1334. X#define                                 COURIER                 8
  1335. X#define                                 NCENBOOK                12
  1336. X                        int                     size;   /* point size */
  1337. X                        int                     color;
  1338. X                        int                     depth;
  1339. X                        double                  angle;  /* in radian */
  1340. X                        int                     style;
  1341. X#define                                 ROMAN           0
  1342. X#define                                 ITALIC          1
  1343. X#define                                 OBLIQUE         1
  1344. X#define                                 BOLD            2
  1345. X#define                                 BOLD_ITALIC     3
  1346. X#define                                 BOLD_OBLIQUE    3
  1347. X                        int                     height; /* pixels */
  1348. X                        int                     length; /* pixels */
  1349. X                        int                     base_x;
  1350. X                        int                     base_y;
  1351. X                        struct f_pen            *pen;
  1352. X                        char                    *cstring;
  1353. X#ifdef  X11
  1354. X                        GC                      gc;
  1355. X#endif  /* X11 */
  1356. X                        struct f_text           *next;
  1357. X                        }
  1358. X                F_text;
  1359. END_OF_FILE
  1360. if test 2809 -ne `wc -c <'transfig/fig2dev/newfont.h'`; then
  1361.     echo shar: \"'transfig/fig2dev/newfont.h'\" unpacked with wrong size!
  1362. fi
  1363. # end of 'transfig/fig2dev/newfont.h'
  1364. fi
  1365. if test -f 'transfig/fig2dev/pi.h' -a "${1}" != "-c" ; then 
  1366.   echo shar: Will not clobber existing file \"'transfig/fig2dev/pi.h'\"
  1367. else
  1368. echo shar: Extracting \"'transfig/fig2dev/pi.h'\" \(94 characters\)
  1369. sed "s/^X//" >'transfig/fig2dev/pi.h' <<'END_OF_FILE'
  1370. X#ifndef M_PI
  1371. X#define M_PI    3.14159265358979323846
  1372. X#define M_PI_2    1.57079632679489661923
  1373. X#endif
  1374. END_OF_FILE
  1375. if test 94 -ne `wc -c <'transfig/fig2dev/pi.h'`; then
  1376.     echo shar: \"'transfig/fig2dev/pi.h'\" unpacked with wrong size!
  1377. fi
  1378. # end of 'transfig/fig2dev/pi.h'
  1379. fi
  1380. if test -f 'transfig/fig2dev/pic2tpic' -a "${1}" != "-c" ; then 
  1381.   echo shar: Will not clobber existing file \"'transfig/fig2dev/pic2tpic'\"
  1382. else
  1383. echo shar: Extracting \"'transfig/fig2dev/pic2tpic'\" \(1034 characters\)
  1384. sed "s/^X//" >'transfig/fig2dev/pic2tpic' <<'END_OF_FILE'
  1385. X#!/bin/sh
  1386. Xsed -e '
  1387. X    s/\(\\f[^(]\)\(\\s[0-9]*\)/\2\1/g
  1388. X    s/\(\\f(..\)\(\\s[0-9]*\)/\2\1/g
  1389. X    s/"\([^"]*\)\\fP\([^"]*\)"/"\1\2"/g
  1390. X    s/"\([^"]*\)\\fR\([^"]*\)"/"\1\\rm \2"/g
  1391. X    s/"\([^"]*\)\\fI\([^"]*\)"/"\1\\it \2"/g
  1392. X    s/"\([^"]*\)\\fB\([^"]*\)"/"\1\\bf \2"/g
  1393. X    s/"\([^"]*\)\\fH\([^"]*\)"/"\1\\ss \2"/g
  1394. X    s/"\([^"]*\)\\fC\([^"]*\)"/"\1\\tt \2"/g
  1395. X    s/"\([^"]*\)\\f(CO\([^"]*\)"/"\1\\tt \2"/g
  1396. X    s/"\([^"]*\)\\f(CW\([^"]*\)"/"\1\\tt \2"/g
  1397. X    s/"\([^"]*\)\\s0\([^"]*\)"/"\1\2"/g
  1398. X    s/"\([^"]*\)\\s[56]\([^0-9][^"]*\)"/"\1\\tiny \2"/g
  1399. X    s/"\([^"]*\)\\s7\([^0-9][^"]*\)"/"\1\\scriptsize \2"/g
  1400. X    s/"\([^"]*\)\\s8\([^0-9][^"]*\)"/"\1\\footnotesize \2"/g
  1401. X    s/"\([^"]*\)\\s9\([^0-9][^"]*\)"/"\1\\small \2"/g
  1402. X    s/"\([^"]*\)\\s1[01]\([^"]*\)"/"\1\\normalsize \2"/g
  1403. X    s/"\([^"]*\)\\s1[23]\([^"]*\)"/"\1\\large \2"/g
  1404. X    s/"\([^"]*\)\\s1[4-6]\([^"]*\)"/"\1\\Large \2"/g
  1405. X    s/"\([^"]*\)\\s1[7-9]\([^"]*\)"/"\1\\LARGE \2"/g
  1406. X    s/"\([^"]*\)\\s2[0-3]\([^"]*\)"/"\1\\huge \2"/g
  1407. X    s/"\([^"]*\)\\s2[4-9]\([^"]*\)"/"\1\\Huge \2"/g
  1408. X    s/"\([^"]*\)\\s3[0-9]\([^"]*\)"/"\1\\Huge \2"/g
  1409. X    ' $*
  1410. END_OF_FILE
  1411. if test 1034 -ne `wc -c <'transfig/fig2dev/pic2tpic'`; then
  1412.     echo shar: \"'transfig/fig2dev/pic2tpic'\" unpacked with wrong size!
  1413. fi
  1414. # end of 'transfig/fig2dev/pic2tpic'
  1415. fi
  1416. if test -f 'transfig/patchlevel.h' -a "${1}" != "-c" ; then 
  1417.   echo shar: Will not clobber existing file \"'transfig/patchlevel.h'\"
  1418. else
  1419. echo shar: Extracting \"'transfig/patchlevel.h'\" \(21 characters\)
  1420. sed "s/^X//" >'transfig/patchlevel.h' <<'END_OF_FILE'
  1421. X#define PATCHLEVEL 1
  1422. END_OF_FILE
  1423. if test 21 -ne `wc -c <'transfig/patchlevel.h'`; then
  1424.     echo shar: \"'transfig/patchlevel.h'\" unpacked with wrong size!
  1425. fi
  1426. # end of 'transfig/patchlevel.h'
  1427. fi
  1428. if test ! -d 'transfig/transfig' ; then
  1429.     echo shar: Creating directory \"'transfig/transfig'\"
  1430.     mkdir 'transfig/transfig'
  1431. fi
  1432. if test -f 'transfig/transfig/Makefile' -a "${1}" != "-c" ; then 
  1433.   echo shar: Will not clobber existing file \"'transfig/transfig/Makefile'\"
  1434. else
  1435. echo shar: Extracting \"'transfig/transfig/Makefile'\" \(358 characters\)
  1436. sed "s/^X//" >'transfig/transfig/Makefile' <<'END_OF_FILE'
  1437. X#    TransFig : Fig code translation Makefile creation program
  1438. X#
  1439. X#    Micah Beck
  1440. X#
  1441. X
  1442. XOBJ = transfig.o txfile.o mkfile.o sys.o ../fig2dev/getopt.c
  1443. X
  1444. X#CFLAGS =  -g
  1445. XCFLAGS = -O
  1446. X
  1447. XTARGET = transfig$(TARGET_ARCH)
  1448. X
  1449. X$(TARGET): $(OBJ)
  1450. X    $(CC) $(TARGET_ARCH) $(OBJ) -lm -o $(TARGET)
  1451. X
  1452. X$(OBJ): transfig.h
  1453. X
  1454. X#########
  1455. Xtidy: 
  1456. X    rm -f *.o
  1457. X
  1458. Xclean: 
  1459. X    rm -f *.o transfig transfig-* core
  1460. END_OF_FILE
  1461. if test 358 -ne `wc -c <'transfig/transfig/Makefile'`; then
  1462.     echo shar: \"'transfig/transfig/Makefile'\" unpacked with wrong size!
  1463. fi
  1464. # end of 'transfig/transfig/Makefile'
  1465. fi
  1466. if test -f 'transfig/transfig/mkfile.c' -a "${1}" != "-c" ; then 
  1467.   echo shar: Will not clobber existing file \"'transfig/transfig/mkfile.c'\"
  1468. else
  1469. echo shar: Extracting \"'transfig/transfig/mkfile.c'\" \(3510 characters\)
  1470. sed "s/^X//" >'transfig/transfig/mkfile.c' <<'END_OF_FILE'
  1471. X#include <stdio.h>
  1472. X#include "transfig.h"
  1473. X
  1474. X/*
  1475. X * create an appropriate makefile
  1476. X */
  1477. Xmakefile(mk, arg_list)
  1478. XFILE *mk;
  1479. Xargument *arg_list;
  1480. X{
  1481. X  argument *a;
  1482. X  char *i;
  1483. X  enum language to;
  1484. X  int needps, needpic, needfig;
  1485. X  
  1486. X
  1487. X  fprintf(mk, "#\n# TransFig makefile\n#\n");
  1488. X
  1489. X  fprintf(mk, "\nall: ");
  1490. X  for (a = arglist; a; a = a->next)
  1491. X        fprintf(mk, "%s.tex ", a->name);
  1492. X  fprintf(mk, "\n");
  1493. X
  1494. X  for (a = arglist; a; a = a->next)
  1495. X  {
  1496. X    i = a->name;
  1497. X    to = a->tolang;
  1498. X
  1499. X    needps = needpic = needfig = 0;
  1500. X
  1501. X    fprintf(mk, "\n# translation into %s\n\n", lname[(int)to]);
  1502. X
  1503. X    switch (to)
  1504. X    {
  1505. X    case pictex:
  1506. X        putfig(mk, pictex, a->f, a->s, a->m, i, "tex");
  1507. X        needfig = 1;
  1508. X        break;
  1509. X
  1510. X    case postscript:
  1511. X                puttarget(mk, i, "tex", "ps");
  1512. X                fprintf(mk, "\tfig2ps2tex %s.ps >%s.tex\n", i, i);
  1513. X        needps = 1;
  1514. X                break;
  1515. X
  1516. X        case psfig:
  1517. X                puttarget(mk, i, "tex", "ps");
  1518. X                fprintf(mk,"\techo \'\\strut\\psfig\{figure=%s.ps\}\' >%s.tex\n",
  1519. X                          i, i);
  1520. X        needps = 1;
  1521. X                break;
  1522. X
  1523. X    case latex:
  1524. X        putfig(mk, latex, a->f, a->s, a->m, i, "tex");
  1525. X        needfig = 1;
  1526. X        break;
  1527. X
  1528. X    case eepicemu:
  1529. X    case epic:
  1530. X    case eepic:
  1531. X        putfig(mk, to, a->f, a->s, a->m, i, "tex");
  1532. X        needfig = 1;
  1533. X        break;
  1534. X
  1535. X    case tpic:
  1536. X        puttarget(mk, i, "tex", "pic");
  1537. X        /* fprintf(mk, "\ttpic %s.pic\n", i); */
  1538. X        fprintf(mk, "\tpic2tpic %s.pic | tpic > %s.tex\n", i, i);
  1539. X        fprintf(mk, "\techo \'\\strut\\box\\graph\' >>%s.tex\n", i);
  1540. X        needpic = 1;
  1541. X        break;
  1542. X
  1543. X    case box:
  1544. X        putfig(mk, box, NULL, NULL, a->m, i, "tex");
  1545. X        needfig = 1;
  1546. X        break;
  1547. X
  1548. X    }
  1549. X
  1550. X    putclean(mk, i, "tex" );
  1551. X
  1552. X    /* conversion to postscript */
  1553. X    if (needps && a->type != ps) {
  1554. X        if ( a->tops ) {
  1555. X            puttarget(mk, i, "ps", iname[(int)a->type]);
  1556. X            fprintf(mk, "\t%s %s.%s > %s.ps\n", a->tops, i, iname[(int)a->type], i);
  1557. X        }
  1558. X        else {
  1559. X                    putfig(mk, postscript, a->f, a->s, a->m, i, "ps");
  1560. X                    a->interm = mksuff(i, ".ps");
  1561. X            needfig = 1;
  1562. X        }
  1563. X        putclean(mk, i, "ps" );
  1564. X    }
  1565. X
  1566. X    /* conversion to pic */
  1567. X    if (needpic && a->type != pic) {
  1568. X        if ( a->topic ) {
  1569. X            puttarget(mk, i, "pic", iname[(int)a->type]);
  1570. X            fprintf(mk, "\t%s %s.%s > %s.pic\n", a->topic, i, iname[(int)a->type],i);
  1571. X        }
  1572. X        else {
  1573. X            putfig(mk, tpic, a->f, a->s, a->m, i, "pic");
  1574. X
  1575. X            needfig = 1;
  1576. X        }
  1577. X        putclean(mk, i, "pic" );
  1578. X    }
  1579. X
  1580. X    /* conversion to fig */
  1581. X    if (needfig && a->type != fig) {
  1582. X        if ( a->tofig ) {
  1583. X            puttarget(mk, i, "fig", iname[(int)a->type]);
  1584. X            fprintf(mk, "\t%s %s.%s > %s.fig\n", a->tofig, i, iname[(int)a->type],i);
  1585. X            a->interm = mksuff(i, ".fig");
  1586. X        }
  1587. X        else {
  1588. X            fprintf(stderr, "transfig: warning: don't now how to make %s\n", mksuff(i, ".fig") );
  1589. X        }
  1590. X        putclean(mk, i, "fig" );
  1591. X    }
  1592. X  }
  1593. X}
  1594. X
  1595. Xputtarget(mk, i, suf1, suf2)
  1596. XFILE *mk;
  1597. Xchar *i, *suf1, *suf2;
  1598. X{
  1599. X    fprintf(mk, "%s.%s: %s.%s %s\n", i, suf1, i, suf2, mkfile);
  1600. X}
  1601. X
  1602. Xputfig(mk, to, f, s, m, i, suf)
  1603. XFILE *mk;
  1604. Xenum language to;
  1605. Xchar *f, *s, *m, *i, *suf;
  1606. X{
  1607. X  fprintf(mk, "%s%s%s: %s.fig %s\n",
  1608. X           i, (suf ? "." : ""), (suf ? suf : ""), i, mkfile);
  1609. X
  1610. X  if ( to == tpic )
  1611. X      fprintf(mk, "\tfig2dev -L pic ");
  1612. X  else
  1613. X      fprintf(mk, "\tfig2dev -L %s ", lname[(int)to]);
  1614. X
  1615. X  if (f && *f) fprintf(mk, "-f %s ", f);
  1616. X  if (s && *s) fprintf(mk, "-s %s ", s);
  1617. X  if (m && *m) fprintf(mk, "-m %s ", m);
  1618. X
  1619. X  fprintf(mk, "%s.fig > %s%s%s\n", i, i, (suf ? "." : ""), (suf ? suf : ""));
  1620. X}
  1621. X
  1622. Xputclean(mk, i, suf)
  1623. XFILE *mk;
  1624. Xchar *i, *suf;
  1625. X{
  1626. X   fprintf(mk, "clean::\n");
  1627. X   fprintf(mk, "\trm -f %s.%s\n", i, suf);
  1628. X   fprintf(mk, "\n");
  1629. X}
  1630. END_OF_FILE
  1631. if test 3510 -ne `wc -c <'transfig/transfig/mkfile.c'`; then
  1632.     echo shar: \"'transfig/transfig/mkfile.c'\" unpacked with wrong size!
  1633. fi
  1634. # end of 'transfig/transfig/mkfile.c'
  1635. fi
  1636. if test -f 'transfig/transfig/sys.c' -a "${1}" != "-c" ; then 
  1637.   echo shar: Will not clobber existing file \"'transfig/transfig/sys.c'\"
  1638. else
  1639. echo shar: Extracting \"'transfig/transfig/sys.c'\" \(857 characters\)
  1640. sed "s/^X//" >'transfig/transfig/sys.c' <<'END_OF_FILE'
  1641. X#include <stdio.h>
  1642. X#include "transfig.h"
  1643. X
  1644. X#define MAXSYS 1000
  1645. Xstatic char sysbuf[MAXSYS];
  1646. X
  1647. Xchar *sysls()
  1648. X{
  1649. X  FILE *ls;
  1650. X  int i;
  1651. X  char c;
  1652. X
  1653. X  ls = popen("/bin/ls *.fig", "r");
  1654. X  i = 0;
  1655. X  c = fgetc(ls);
  1656. X  while (c != EOF & i < MAXSYS-1)
  1657. X  {
  1658. X    sysbuf[i] = c;
  1659. X    i += 1;
  1660. X    c = fgetc(ls);
  1661. X  }
  1662. X  sysbuf[i] = NULL;
  1663. X  return sysbuf;
  1664. X}
  1665. X
  1666. Xsysmv(f)
  1667. Xchar *f;
  1668. X{
  1669. X  sprintf(sysbuf, "%s~", f);
  1670. X  unlink(sysbuf);
  1671. X  if (!link(f, sysbuf)) unlink(f);
  1672. X}
  1673. X
  1674. Xchar *strip(str, suf)
  1675. Xchar *str, *suf;
  1676. X{
  1677. X  char *p1, *p2;
  1678. X
  1679. X  for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1];
  1680. X    (p1 >= str && p2 >= suf) && (*p1 == *p2);
  1681. X    --p1, --p2);
  1682. X
  1683. X  if (p2 < suf)
  1684. X  {
  1685. X    *(p1+1) = NULL;
  1686. X    return str;
  1687. X  } else
  1688. X    return NULL;
  1689. X}
  1690. X
  1691. Xchar *mksuff(name, suff)
  1692. Xchar *name, *suff;
  1693. X{
  1694. X  char *temp;
  1695. X
  1696. X  temp = (char *)malloc(strlen(name)+strlen(suff)+1);
  1697. X  strcpy(temp, name);
  1698. X  strcat(temp, suff);
  1699. X  return temp;
  1700. X}
  1701. END_OF_FILE
  1702. if test 857 -ne `wc -c <'transfig/transfig/sys.c'`; then
  1703.     echo shar: \"'transfig/transfig/sys.c'\" unpacked with wrong size!
  1704. fi
  1705. # end of 'transfig/transfig/sys.c'
  1706. fi
  1707. if test -f 'transfig/transfig/transfig.c' -a "${1}" != "-c" ; then 
  1708.   echo shar: Will not clobber existing file \"'transfig/transfig/transfig.c'\"
  1709. else
  1710. echo shar: Extracting \"'transfig/transfig/transfig.c'\" \(3354 characters\)
  1711. sed "s/^X//" >'transfig/transfig/transfig.c' <<'END_OF_FILE'
  1712. X/*
  1713. X * transfig:     figure translation setup program
  1714. X *        creates TeX macro file and makefile
  1715. X *
  1716. X * usage: transfig <option> ... [[<flag> ... ] [<figure>] ... ] ...
  1717. X *
  1718. X * where:    <option> = -L <language> | -M <makefile> | -T <texfile>
  1719. X *        <flag>     = -f <font> | -s <size> | -m <scale>
  1720. X */
  1721. X
  1722. X#include <stdio.h>
  1723. X#include <string.h>
  1724. X#include "transfig.h"
  1725. X
  1726. Xargument *parse_arg(), *arglist = NULL, *lastarg = NULL;
  1727. Xchar *strip();
  1728. X
  1729. Xchar *mkfile = "Makefile";
  1730. Xchar *txfile = "transfig.tex";
  1731. X
  1732. Xchar *lname[] = {
  1733. X    "box",
  1734. X    "pictex",
  1735. X    "latex",
  1736. X    "epic",
  1737. X    "eepic",
  1738. X    "eepicemu",
  1739. X    "ps",
  1740. X    "psfig",
  1741. X    "tpic"};
  1742. X
  1743. Xchar *iname[] = {
  1744. X    "fig",
  1745. X      "pic",
  1746. X    "x",
  1747. X    "ps"};
  1748. Xmain(argc, argv)
  1749. Xint argc;
  1750. Xchar *argv[];
  1751. X{
  1752. X  FILE *mk, *tx;
  1753. X  enum language tolang = epic;
  1754. X  argument *a;
  1755. X  char c, *cp, *arg_f = NULL, *arg_s = NULL, *arg_m = NULL, *argbuf;
  1756. X
  1757. X  for ( optind = 1; optind < argc; optind++ ) {
  1758. X    cp = argv[optind];
  1759. X    if (*cp == '-')
  1760. X    {
  1761. X      if (!cp[1])
  1762. X    {
  1763. X        fprintf(stderr, "transfig: bad option format '-'\n");
  1764. X        exit(1);
  1765. X    }
  1766. X    if (cp[2])
  1767. X    {
  1768. X        optarg = &cp[2];
  1769. X    } else
  1770. X    {
  1771. X        optind += 1;
  1772. X        if (optind == argc)
  1773. X        {
  1774. X            fprintf(stderr,
  1775. X                "transfig: no value for '%c' arg\n", cp[1]);
  1776. X            exit(1);
  1777. X        }
  1778. X        optarg = argv[optind];
  1779. X    }
  1780. X     switch (cp[1]) {
  1781. X      case 'L':
  1782. X        tolang = str2lang(optarg);
  1783. X        break;
  1784. X      case 'M':
  1785. X        mkfile = optarg;
  1786. X        break;
  1787. X      case 'T':
  1788. X        txfile = optarg;
  1789. X        break;
  1790. X    case 'f':
  1791. X        arg_f = optarg;
  1792. X        break;
  1793. X    case 's':
  1794. X        arg_s = optarg;    
  1795. X        break;
  1796. X    case 'm':
  1797. X        arg_m = optarg;    
  1798. X        break;
  1799. X
  1800. X      default:
  1801. X        fprintf(stderr, "transfig: illegal option -- '%c'\n", *cp);
  1802. X        exit(1);
  1803. X      }
  1804. X    } else
  1805. X    {
  1806. X    a = parse_arg(tolang, arg_f, arg_s, arg_m, argv[optind]);
  1807. X
  1808. X    if ( !lastarg )
  1809. X        arglist = a;
  1810. X    else
  1811. X        lastarg->next = a; 
  1812. X    lastarg = a;
  1813. X    }
  1814. X  }
  1815. X
  1816. X  /* no files specified -> all files */
  1817. X  if (!arglist)
  1818. X  {
  1819. X    argbuf = sysls();
  1820. X    while (cp = strchr(argbuf, '\n'))
  1821. X    {
  1822. X        *cp = '\0';
  1823. X        a = parse_arg(tolang, arg_f, arg_s, arg_m, argbuf);
  1824. X        if ( !lastarg )
  1825. X            arglist = a;
  1826. X        else
  1827. X            lastarg->next = a; 
  1828. X        lastarg = a;
  1829. X        argbuf = cp+1;
  1830. X    }
  1831. X  }
  1832. X
  1833. X  sysmv(mkfile);
  1834. X  tx = fopen(txfile, "w");
  1835. X  texfile(tx, arglist);
  1836. X
  1837. X  mk = fopen(mkfile, "w");
  1838. X  makefile(mk, arglist);
  1839. X}
  1840. X
  1841. Xenum language str2lang(s)
  1842. Xchar *s;
  1843. X{
  1844. X  int i;
  1845. X
  1846. X  /* aliases */
  1847. X  if (!strcmp(s, "pic")) return tpic;
  1848. X  if (!strcmp(s, "postscript")) return postscript;
  1849. X  if (!strcmp(s, "null")) return box;
  1850. X
  1851. X  /* real names*/
  1852. X  for (i = 0; i <= (int)MAXLANG; i++)
  1853. X    if (!strcmp(lname[i], s)) return (enum language)i;
  1854. X
  1855. X  /* other strings */
  1856. X  fprintf(stderr, "Unknown output language \"%s\"\n", s);
  1857. X  exit(1);
  1858. X}
  1859. X
  1860. Xargument *parse_arg(tolang, arg_f, arg_s, arg_m, arg)
  1861. Xenum language tolang;
  1862. Xchar *arg_f, *arg_s, *arg_m, *arg;
  1863. X{
  1864. X  argument *a;
  1865. X
  1866. X  a = (argument *)malloc(sizeof(argument));
  1867. X  a->f = arg_f;
  1868. X  a->s = arg_s;
  1869. X  a->m = arg_m;
  1870. X  a->next = NULL;
  1871. X  a->tofig = NULL;
  1872. X  a->topic = NULL;
  1873. X  a->tops = NULL;
  1874. X  a->tolang = tolang;
  1875. X  
  1876. X  /* PIC */
  1877. X  if (strip(arg, ".pic"))
  1878. X  {
  1879. X      a->name = mksuff(arg, "");
  1880. X      a->type = pic;
  1881. X    a->tofig = PIC2FIG;
  1882. X    return a;
  1883. X  }
  1884. X
  1885. X  /* Xpic format */
  1886. X  if (strip(arg, ".x"))
  1887. X  {
  1888. X      a->name = mksuff(arg, "");
  1889. X      a->type = xpic;
  1890. X    a->tofig = X2FIG;
  1891. X    a->topic = X2PIC;
  1892. X    a->tops = X2PS;
  1893. X     return a;
  1894. X  }
  1895. X
  1896. X  /* PS format */
  1897. X  if (strip(arg, ".ps"))
  1898. X  {
  1899. X      a->name = mksuff(arg, "");
  1900. X      a->type = ps;
  1901. X     return a;
  1902. X  }
  1903. X
  1904. X  /* Fig format */
  1905. X  strip(arg, ".fig");
  1906. X  a->name = mksuff(arg, "");
  1907. X  a->type = fig;
  1908. X  return a;
  1909. X}
  1910. END_OF_FILE
  1911. if test 3354 -ne `wc -c <'transfig/transfig/transfig.c'`; then
  1912.     echo shar: \"'transfig/transfig/transfig.c'\" unpacked with wrong size!
  1913. fi
  1914. # end of 'transfig/transfig/transfig.c'
  1915. fi
  1916. if test -f 'transfig/transfig/transfig.h' -a "${1}" != "-c" ; then 
  1917.   echo shar: Will not clobber existing file \"'transfig/transfig/transfig.h'\"
  1918. else
  1919. echo shar: Extracting \"'transfig/transfig/transfig.h'\" \(767 characters\)
  1920. sed "s/^X//" >'transfig/transfig/transfig.h' <<'END_OF_FILE'
  1921. X/*
  1922. X * converters program names
  1923. X */
  1924. X#define FIG2DEV    "fig2dev"
  1925. X#define PIC2FIG "pic2fig"
  1926. X#define X2FIG "x2fig"
  1927. X#define X2PIC "x2pic"
  1928. X#define X2PS "x2ps -x"
  1929. X
  1930. X/*
  1931. X * filename defaults
  1932. X */
  1933. X#define MK "Makefile"
  1934. X#define TX "transfig.tex"
  1935. X
  1936. Xenum language  {box, pictex, 
  1937. X    latex, epic, eepic, eepicemu,
  1938. X    postscript, psfig, tpic};
  1939. X#define MAXLANG tpic
  1940. X
  1941. Xenum input {fig, pic, xpic, ps};
  1942. X#define MAXINPUT xps
  1943. X
  1944. Xtypedef struct argument{
  1945. X    char *name, *interm, *f, *s, *m, *tofig, *topic, *tops;
  1946. X    enum language tolang;
  1947. X    enum input type;
  1948. X    struct argument *next;
  1949. X} argument ;
  1950. X
  1951. Xextern enum language str2lang();
  1952. Xextern char *lname[];
  1953. Xextern char *iname[];
  1954. X
  1955. Xextern char *sysls(), *mksuff();
  1956. Xextern argument *arglist;
  1957. Xextern char *txfile, *mkfile;
  1958. X
  1959. Xextern char *optarg;
  1960. Xextern int optind;
  1961. X
  1962. END_OF_FILE
  1963. if test 767 -ne `wc -c <'transfig/transfig/transfig.h'`; then
  1964.     echo shar: \"'transfig/transfig/transfig.h'\" unpacked with wrong size!
  1965. fi
  1966. # end of 'transfig/transfig/transfig.h'
  1967. fi
  1968. if test -f 'transfig/transfig/txfile.c' -a "${1}" != "-c" ; then 
  1969.   echo shar: Will not clobber existing file \"'transfig/transfig/txfile.c'\"
  1970. else
  1971. echo shar: Extracting \"'transfig/transfig/txfile.c'\" \(1497 characters\)
  1972. sed "s/^X//" >'transfig/transfig/txfile.c' <<'END_OF_FILE'
  1973. X#include <stdio.h>
  1974. X#include "transfig.h"
  1975. X
  1976. X/*
  1977. X * create appropriate .tex file
  1978. X */
  1979. Xtexfile(tx, arg_list)
  1980. XFILE *tx;
  1981. Xargument *arg_list;
  1982. X{
  1983. X  enum language to;
  1984. X  argument *a, *arg_l;
  1985. X
  1986. X  for (a = arglist; a; a = a->next) {
  1987. X     to = a->tolang;
  1988. X
  1989. X     /* see if we already have this language */
  1990. X     for (arg_l = arglist; arg_l != a; arg_l = arg_l->next)
  1991. X    if ( arg_l->tolang == to ) break;
  1992. X    
  1993. X     if ( arg_l == a )
  1994. X    switch (to)
  1995. X    {
  1996. X    case pictex:
  1997. X        fprintf(tx, "\\typeout{TransFig: figures in PiCTeX.}\n");
  1998. X        fprintf(tx, "\\input{prepictex}\n");
  1999. X        fprintf(tx, "\\input{pictex}\n");
  2000. X        fprintf(tx, "\\input{postpictex}\n");
  2001. X        break;
  2002. X
  2003. X    case postscript:
  2004. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
  2005. X        break;
  2006. X
  2007. X    case psfig:
  2008. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript w/psfig.}\n");
  2009. X        fprintf(tx, "\\input{psfig}\n");
  2010. X        break;
  2011. X
  2012. X    case latex:
  2013. X        fprintf(tx, "\\typeout{TransFig: figures in LaTeX.}\n");
  2014. X        break;
  2015. X
  2016. X    case eepicemu:
  2017. X        to = eepicemu;
  2018. X
  2019. X    case eepic:
  2020. X#ifdef eemulation
  2021. X        to = eepicemu;
  2022. X#endif
  2023. X
  2024. X    case epic:
  2025. X        fprintf(tx, "\\typeout{TransFig: figures in %s.}\n", lname[(int)to]);
  2026. X        if (to == eepicemu || to == eepic)
  2027. X            fprintf(tx, "\\input{epic.sty}");
  2028. X        fprintf(tx, "\\input{%s.sty}\n", lname[(int)to]);
  2029. X        break;
  2030. X
  2031. X    case tpic:
  2032. X        fprintf(tx, "\\typeout{TransFig: figures in tpic.}\n");
  2033. X        break;
  2034. X
  2035. X    case box:
  2036. X        fprintf(tx, "\\typeout{TransFig: null figures.}\n");
  2037. X        break;
  2038. X
  2039. X    default:
  2040. X        fprintf(tx, "Unknown graphics language %s\n", lname[(int)to]);
  2041. X        exit(1);
  2042. X        break;
  2043. X
  2044. X    }
  2045. X  }
  2046. X}
  2047. END_OF_FILE
  2048. if test 1497 -ne `wc -c <'transfig/transfig/txfile.c'`; then
  2049.     echo shar: \"'transfig/transfig/txfile.c'\" unpacked with wrong size!
  2050. fi
  2051. # end of 'transfig/transfig/txfile.c'
  2052. fi
  2053. echo shar: End of archive 1 \(of 6\).
  2054. cp /dev/null ark1isdone
  2055. MISSING=""
  2056. for I in 1 2 3 4 5 6 ; do
  2057.     if test ! -f ark${I}isdone ; then
  2058.     MISSING="${MISSING} ${I}"
  2059.     fi
  2060. done
  2061. if test "${MISSING}" = "" ; then
  2062.     echo You have unpacked all 6 archives.
  2063.     rm -f ark[1-9]isdone
  2064. else
  2065.     echo You still need to unpack the following archives:
  2066.     echo "        " ${MISSING}
  2067. fi
  2068. ##  End of shell archive.
  2069. exit 0
  2070.